package com.huawei.gamebox.plugin.gameservice.view;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.huawei.appmarket.service.export.CommonExportedActivity;
import com.huawei.appmarket.service.externalapi.view.ThirdApiActivity;
import com.huawei.fastengine.fastview.download.utils.PackageUtils;
import com.huawei.gamebox.plugin.gameservice.action.IGameServiceAction;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
import o.bkw.c;
import o.cfi;
import o.cjm;
import o.dgm;
import o.dip;
import o.diu;
import o.Logger;
import o.dyr;
import o.dys;
import o.dys.a;
import o.eqf;
import o.fiu;
import o.fjb;

public class TransferActivity extends CommonExportedActivity implements a {
    private IGameServiceAction ˊॱ;

    public void onCreate(Bundle bundle) {
        Logger.ˏ("TransferActivity", "TransferActivity is onCreate.");
        requestWindowFeature(1);
        getWindow().setFlags(WXMediaMessage.DESCRIPTION_LENGTH_LIMIT, WXMediaMessage.DESCRIPTION_LENGTH_LIMIT);
        super.onCreate(bundle);
        ॱॱ();
        getWindow().setBackgroundDrawableResource(c.ˏ);
        dgm.ˋ(4, this);
    }

    public void onDestroy() {
        Logger.ˏ("TransferActivity", "TransferActivity is finished.");
        diu.ˊ().ˋ(this);
        super.onDestroy();
        if (this.ˊॱ != null) {
            this.ˊॱ.onDestroy();
        }
    }

    public void onResume() {
        Logger.ˏ("TransferActivity", "TransferActivity is onResume.");
        super.onResume();
        if (this.ˊॱ != null) {
            this.ˊॱ.onResume();
        }
    }

    public void onStop() {
        Logger.ˏ("TransferActivity", "TransferActivity is onStop.");
        super.onStop();
        if (this.ˊॱ != null) {
            this.ˊॱ.onStop();
        }
    }

    public void onPause() {
        Logger.ˏ("TransferActivity", "TransferActivity is onPause.");
        super.onPause();
        if (this.ˊॱ != null) {
            this.ˊॱ.onPause();
        }
    }

    public cfi ᐝ() {
        if (PackageUtils.HWGAMEBOX_PACKAGE_NAME.equals(ˊ().getPackageName())) {
            return super.ᐝ();
        }
        cfi o_cfi = new cfi(this);
        o_cfi.ˏ(new eqf(this));
        o_cfi.ˏ(dip.ˏ(this));
        return o_cfi;
    }

    private void ॱ(Intent intent) {
        Logger.ˏ("TransferActivity", "enter doTransfer");
        if (intent == null || intent.getAction() == null) {
            Logger.ˏ("TransferActivity", "enter dispatchDefaultAction");
            ॱˊ();
            return;
        }
        Logger.ˏ("TransferActivity", "action:" + intent.getAction());
        dyr ˋ = dys.ˋ(this);
        if (ˋ instanceof IGameServiceAction) {
            this.ˊॱ = (IGameServiceAction) ˋ;
            this.ˊॱ.onAction();
            return;
        }
        ॱˊ();
    }

    private void ॱˊ() {
        Logger.ˏ("TransferActivity", "[dispatchDefaultAction]finish activity");
        finish();
    }

    public void onActivityResult(int i, int i2, Intent intent) {
        Logger.ˏ("TransferActivity", "onActivityResult:" + i + "," + i2);
        super.onActivityResult(i, i2, intent);
        if (this.ˊॱ != null) {
            this.ˊॱ.onActivityResult(i, i2, intent);
        }
    }

    public void ʼ() {
        Logger.ˏ("TransferActivity", "TransferActivity is onCreateContinue.");
        View view = new View(this);
        view.setAlpha(0.0f);
        setContentView(view);
        ॱ(getIntent());
    }

    public void ॱ(ThirdApiActivity.a aVar) {
    }

    public void ˎ(cjm o_cjm, int i) {
    }

    public void ˊ(String str) {
    }

    public void ˋ(cjm o_cjm, int i) {
    }

    public void finish() {
        super.finish();
        if (this.ˊॱ != null) {
            this.ˊॱ.doFinish();
        }
    }

    public Activity ˊ() {
        return this;
    }

    public void ˏ(fjb o_fjb, Intent intent) {
        fiu.ˊ().ॱ((Context) this, o_fjb, intent);
    }

    public String ˏ() {
        return null;
    }

    public void ˎ() {
        setResult(999);
        super.ˎ();
    }
}
